<template>
	<view>
		<mumu-get-qrcode @success='qrcodeSucess' @error="qrcodeError"></mumu-get-qrcode>
	</view>
</template>
<script>
	import mumuGetQrcode from '@/uni_modules/mumu-getQrcode/components/mumu-getQrcode/mumu-getQrcode.vue'
	export default {
		data() {
			return {
				urlObj:{
					
				},
			}
		},
		components: {
			mumuGetQrcode
		},
		methods: {
			 testClick(){
				 uni.navigateTo({
				 	url:'/pages/transfer/transfer?userId=7879'
				 })
			 },
			orderDetailPath(){
				uni.navigateTo({
					url:'/pages/orderDetail/orderDetail?orderId='+this.urlObj.orderId
				})
			},
			qrcodeSucess(url){
				this.urlObj=JSON.parse(url)
				if(this.urlObj.type==1){
				    //核销票务
					this.orderDetailPath()
					// this.isExpressFn(this.urlObj.orderId)
				}else{
					//扣款
					uni.navigateTo({
						url:`/pages/transfer/transfer?userId=${this.urlObj.userId}&uuid=${this.urlObj.uuid}`
					})
				}
			},
			qrcodeError(err) {
				uni.showModal({
					title: '摄像头授权失败',
					content: '摄像头授权失败，请检测当前浏览器是否有摄像头权限。',
					success: () => {
						uni.switchTab({
							url: '/pages/tabbar/index/index'
						})
					}
				})
			},
		}
	}
</script>

<style lang="scss">
	.custom_style {
		color: #fff;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		font-size: 24rpx;

		&_icon {
			width: 242rpx;
			height: 124rpx;

			// border-radius: 50%;
			display: flex;
			justify-content: center;
			align-items: center;
			margin-top: -30rpx;
		}
	}
</style>